﻿using Microsoft.Practices.Composite.Modularity;
using Microsoft.Practices.Composite.Regions;
using SharePointUtilitiesForDevelopers.Client.Wpf.Infrastructure;
using SharePointUtilitiesForDevelopers.Client.Wpf.Modules.SiteNavigator.Views.SiteView;

namespace SharePointUtilitiesForDevelopers.Client.Wpf.Modules.SiteNavigator
{
    /// <summary>
    /// Site navigator module
    /// </summary>
    public class SiteNavigatorModule : IModule
    {
        private readonly IRegionManager _regionManager;

        /// <summary>
        /// Initializes a new instance of the <see cref="SiteNavigatorModule"/> class.
        /// </summary>
        /// <param name="regionManager">The region manager.</param>
        public SiteNavigatorModule(IRegionManager regionManager)
        {
            _regionManager = regionManager;
        }

        /// <summary>
        /// Initializes this instance.
        /// </summary>
        public void Initialize()
        {
            _regionManager.RegisterViewWithRegion(RegionNames.MainRegion, typeof(SiteView));

        }
    }
}
